{include file="header.html"}

<div class="main fn-clear">
	<div class="my-title">
    	<h1>交易记录<span><a href="index.php?c=index&a=balance_detail">收支明细</a></span></h1>
        <form id="record_form">
        <p>交易状态：<select name="status">
            <option value="">交易状态---</option>
          <option value="15">交易成功</option>
          <option value="14">等待确认收货</option>
          <option value="3">等待卖家发货</option>
          <option value="0">等待买家付款</option>
      </select>&nbsp;&nbsp;&nbsp;&nbsp;交易时间：<input name="trade_time_start" type="text" id="trade_time_start">&nbsp;&nbsp;到&nbsp;&nbsp;<input name="trade_time_end" type="text" id="trade_time_end">&nbsp;&nbsp;商户名称：<input name="seller_name" type="text">&nbsp;&nbsp;交易名称：<input name="goods_name" type="text">&nbsp;&nbsp;<input type="hidden" id="record_type" value="trade"><input class="search" id="record_search" name="" type="button" value="查询"></p></form>
        <div class="action">可用余额：<em>{$user_info.vcount}</em>元</div>
    </div>
    <div class="list-box">
    	<table>
            <tbody>
            	<tr class="title">
                    <td>订单号</td>
                	<td class="time">创建时间</td>
                	<td class="name">交易名称</td>
                	<td class="from">商户</td>
                	<td class="amount">金额</td>
                	<td class="payment">状态</td>
                	<td class="detail">操作</td>
                </tr>
                {foreach from=$rs item=re}
            	<tr>
                    <td>{$re.order_sn_main}</td>
                	<td class="time">{$re.add_time}</td>
                	<td class="name"><a href="http://www.ppsc.com.cn/product-{$re.goods_id}.html" target="_blank">{$re.goods_name}</a></td>
                	<td class="from"><a href="http://www.ppsc.com.cn/store-{$re.seller_id}-39.html" target="_blank">{$re.seller_name}</a></td>
                	<td class="amount">{if ($re.b_type eq 0) and ($re.pay_status neq 0)}<span class="pay-in">+{$re.order_amount}</span>{elseif ($re.b_type eq 1) and ($re.pay_status neq 0)}<span class="pay-out">-{$re.order_amount}</span>{else}<span class="pay-un">-{$re.order_amount}</span>{/if}</td>
                	<td class="payment">{if $re.pay_status eq 0}未支付{else}{$conf[$re.status].ch_name}{/if}</td>
                	<td class="detail">
					{if $re.myself eq 1}<a href="http://www.ppsc.com.cn/index.php?app=member.member_order&act=detail&id={$re.order_sn_main}&uid={$re.buyer_id}&order_time=&ret_page=1" target="_blank">查看</a>{else}销售订单请到后台查看{/if}</td>
                </tr>
            	{/foreach}
            </tbody>
            <tfoot>
            	<tr>
                	<td colspan="7">
                	{$page_str}
                    </td>
                </tr>
            </tfoot>
        </table>
    </div>
</div>
{include file="footer.html"}
